package com.dai.zhenfujin.issue.activity.room;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.dai.zhenfujin.R;
import com.dai.zhenfujin.base.BaseActivity;

/**
 * 新房的发布产品
 */
public class IssueNewHHousActivity extends BaseActivity implements View.OnClickListener {
    private EditText etName,etProductPrice,etAcreage,etHouseType,etElevator,etTime,etSite;
    private TextView tvResidence,tvVilla,tvHouses,tvLakeView;
    private TextView tvItems,tvDelivery,tvNew,tvCommunity;
    private TextView tvHospital,tvRail,tvSchool;
    private ImageView ivProductPicture;


    private TextView tvTitle;
    private ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_issue_new_hhous);

        initView();
        initListener();

    }

    private void initListener() {
        tvResidence.setOnClickListener(this);
        tvVilla.setOnClickListener(this);
        tvHouses.setOnClickListener(this);
        tvLakeView.setOnClickListener(this);
        tvItems.setOnClickListener(this);
        tvDelivery.setOnClickListener(this);
        tvNew.setOnClickListener(this);
        tvCommunity.setOnClickListener(this);
        tvHospital.setOnClickListener(this);
        tvRail.setOnClickListener(this);
        tvSchool.setOnClickListener(this);
    }

    private void initView() {


        tvTitle = findViewById(R.id.title_textview);
        tvTitle.setText("发布产品");
        imageView = findViewById(R.id.title_imageview);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        etName = findViewById(R.id.issue_new_et_product_name);//产品名称
        etProductPrice = findViewById(R.id.issue_new_et_product_price);//参考均价
        etAcreage = findViewById(R.id.issue_new_et_acreage);//面积
        etHouseType = findViewById(R.id.issue_new_et_house_type);//户型
        etTime = findViewById(R.id.issue_new_et_time);//开盘
        etElevator = findViewById(R.id.issue_new_et_elevator);//电梯
        etSite= findViewById(R.id.issue_new_et_site);//地址
        ivProductPicture= findViewById(R.id.issue_new_iv_product_picture);//产品图


        tvResidence = findViewById(R.id.product_launch_pl_tv1);//住宅
        tvVilla= findViewById(R.id.product_launch_pl_tv2);//别墅
        tvHouses= findViewById(R.id.product_launch_pl_tv3);//人气楼盘
        tvLakeView= findViewById(R.id.product_launch_pl_tv4);//湖景地产
        tvItems= findViewById(R.id.product_launch_pl_tv5);//项目在建
        tvDelivery= findViewById(R.id.product_launch_pl_tv6);//装修交付
        tvNew= findViewById(R.id.product_launch_pl_tv7);//新开盘
        tvCommunity= findViewById(R.id.product_launch_pl_tv8);//大型社区
        tvHospital= findViewById(R.id.product_launch_pl_tv9);// 医院
        tvRail= findViewById(R.id.product_launch_pl_tv10);//轨交房
        tvSchool= findViewById(R.id.product_launch_pl_tv11);//学校

        tvResidence.setText("住宅");
        tvVilla.setText("别墅");
        tvHouses.setText("人气楼盘");
        tvLakeView.setText("湖景地产");
        tvItems.setText("项目在建");
        tvDelivery.setText("装修交付");
        tvNew.setText("新开盘");
        tvCommunity.setText("大型社区");
        tvHospital.setText("医院");
        tvRail.setText("轨交房");
        tvSchool.setText("学校");




    }

    @Override
    public void onClick(View v) {
       switch (v.getId()){
           case R.id.product_launch_pl_tv1://住宅
               break;
           case R.id.product_launch_pl_tv2://别墅
               break;
           case R.id.product_launch_pl_tv3://人气楼盘
               break;
           case R.id.product_launch_pl_tv4://湖景地产
               break;
           case R.id.product_launch_pl_tv5://项目在建
               break;
           case R.id.product_launch_pl_tv6://装修交付
               break;
           case R.id.product_launch_pl_tv7://新开盘
               break;
           case R.id.product_launch_pl_tv8://大型社区
               break;
           case R.id.product_launch_pl_tv9:// 医院
               break;
           case R.id.product_launch_pl_tv10://轨交房
               break;
           case R.id.product_launch_pl_tv11://学校
               break;
       }
    }
}
